<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    .page {
      width: 100vw;
      height: 100vh;
    }
    .top {
      background-color: #f0f0f0;
    }
    .mid {
      display: flex;
      flex: 1;
      height: 700px;
    }
    .left {
      background-color: pink;
      width: 200px;
      height: 700px;
    }
    .right {
      background-color: blue;
      height: 700px;
      flex: 1;
    }
    .footer {
      background-color: red;
    }
  </style>
</head>
<body>
  <div id="app">
    
  </div>
  <template id="top">
    <div class="top">
      top
    </div>
  </template>
  <template id="mid">
    <div class="mid">
      <v-left></v-left>
      <v-right></v-right>
    </div>
  </template>
  <template id="left">
    <div class="left">
      left
    </div>
  </template>
  <template id="right">
    <div class="right">
      right
    </div>
  </template>
  <template id="footer">
    <div class="footer">
      footer
    </div>
  </template>
  <script src="../vue.js"></script>
  <script>
    // 全局注册的组件
    let vTop = Vue.component('vTop', {
      template: '#top'
    })
    let vMid = Vue.component('vMid', {
      template: '#mid'
    })
    let vLeft = Vue.component('vLeft', {
      template: '#left'
    })
    let vRight = Vue.component('vRight', {
      template: '#right'
    })
    let vFooter = Vue.component('vFooter', {
      template: '#footer'
    })
    let vm = new Vue({
      el: '#app',
      data() {
        return {
          
        }
      },
      template: '<v-page></v-page>',
      components: {
        vPage: {
          template: `
          <div>
            <vTop></vTop>
            <vMid></vMid>
            <vFooter></vFooter>
          </div>
          `
        }
      }
    })
  </script>
</body>
</html>